/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.OneToMany;

public class Subscriptions extends ServicePlan implements Serializable {

    private Double svcPlanMthFee; 
    private Double svcPlanThreshold; //applicable for commission based service 
    private Double svcPlanComm;
    private Long startOfDate; 
    private Long endOfDate; 
    
    @OneToMany(cascade={CascadeType.ALL})
    private ValueAddedService vas;

    public Subscriptions(){
        svcPlanMthFee = 0.0; 
        svcPlanThreshold = 0.0; 
        svcPlanComm = 0.0;
    }
    
    public void createSubscriptions(Double mthFee, Double threshold, Double comm){
        this.svcPlanMthFee = mthFee; 
        this.svcPlanThreshold = threshold; 
        this.svcPlanComm = comm; 
        this.startOfDate = System.currentTimeMillis(); 
    }

    public Double getSvcPlanMthFee() {
        return svcPlanMthFee;
    }

    public void setSvcPlanMthFee(Double svcPlanMthFee) {
        this.svcPlanMthFee = svcPlanMthFee;
    }

    public Double getSvcPlanThreshold() {
        return svcPlanThreshold;
    }

    public void setSvcPlanThreshold(Double svcPlanThreshold) {
        this.svcPlanThreshold = svcPlanThreshold;
    }

    public Double getSvcPlanComm() {
        return svcPlanComm;
    }

    public void setSvcPlanComm(Double svcPlanComm) {
        this.svcPlanComm = svcPlanComm;
    }
    
        public Long getStartOfDate() {
        return startOfDate;
    }

    public void setStartOfDate(Long startOfDate) {
        this.startOfDate = startOfDate;
    }

    public Long getEndOfDate() {
        return endOfDate;
    }

    public void setEndOfDate(Long endOfDate) {
        this.endOfDate = endOfDate;
    }

    public ValueAddedService getVas() {
        return vas;
    }

    public void setVas(ValueAddedService vas) {
        this.vas = vas;
    }

}
